﻿<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
   xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"   
     xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
  xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input">
    <SolidColorBrush Color="#B5B5B5" x:Key="SomeGray"/>
    <SolidColorBrush Color="#E8E8E8" x:Key="MoreGray"></SolidColorBrush>    
    <!--标签按钮-->
    <Style x:Key="ListViewHeadBtnStyle" TargetType="Button">
        <Style.Setters>
            <Setter Property="Width" Value="20"></Setter>
            <Setter Property="Height" Value="20"></Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid  x:Name="Container">
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="Normal" />
                                    <vsm:VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="fillColor" Storyboard.TargetProperty="Opacity" Duration="0" To=".35"/>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Rectangle x:Name="fillColor" Opacity="0" Fill="#B5B5B5"  IsHitTestVisible="False" RadiusX="1" RadiusY="1"/>
                            <ContentPresenter                                
    			                x:Name="contentPresenter"
    			                Content="{TemplateBinding Content}"
    			                ContentTemplate="{TemplateBinding ContentTemplate}"
    			                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
    			                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
    			                Margin="{TemplateBinding Padding}"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style.Setters>
    </Style>
    <!--多行文本框-->
    <Style x:Key="MultyLineTextBox" TargetType="TextBox">
        <Setter Property="TextWrapping" Value="Wrap"></Setter>
        <Setter Property="AcceptsReturn" Value="True"></Setter>
    </Style>
    <!--单行文本框-->
    <Style x:Key="MenuTextStyle" TargetType="TextBlock">
        <Setter Property="FontSize" Value="14"></Setter>
    </Style>
    <!--头部分隔条渐变背景-->
    <LinearGradientBrush x:Key="HeadSplitor" StartPoint="0.5 0" EndPoint="0.5 1">
        <GradientStop Offset="0" Color="#FAFAFA"></GradientStop>
        <GradientStop Offset="1" Color="#000000"></GradientStop>
    </LinearGradientBrush>
    <!--头部渐变背景-->
    <LinearGradientBrush x:Key="HeadBG" StartPoint="0.5 0" EndPoint="0.5 1">
        <GradientStop Offset="0" Color="#FAFAFA"></GradientStop>
        <GradientStop Offset="0.5" Color="#D6D6D6"></GradientStop>
    </LinearGradientBrush>
    <!--子菜单样式-->
    <Style TargetType="ListBoxItem" x:Key="ListBoxItemStyleNew" >
        <Setter Property="Padding" Value="3" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="TabNavigation" Value="Local" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Grid Background="{TemplateBinding Background}">
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CommonStates">
                                <vsm:VisualState x:Name="Normal" />
                                <vsm:VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="fillColor" Storyboard.TargetProperty="Opacity" Duration="0" To=".35"/>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Opacity" Duration="0" To=".55" />
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                            <vsm:VisualStateGroup x:Name="SelectionStates">
                                <vsm:VisualState x:Name="Unselected" />
                                <vsm:VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="fillColor2" Storyboard.TargetProperty="Opacity" Duration="0" To=".75"/>
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                            <vsm:VisualStateGroup x:Name="FocusStates">
                                <vsm:VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Unfocused"/>
                            </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="fillColor" Opacity="0" Fill="#B5B5B5"  IsHitTestVisible="False" RadiusX="1" RadiusY="1"/>
                        <Rectangle x:Name="fillColor2" Opacity="0" Fill="#FFBADDE9" IsHitTestVisible="False" RadiusX="1" RadiusY="1"/>
                        <ContentPresenter
                              x:Name="contentPresenter"
                                Cursor="Hand"
                              Content="{TemplateBinding Content}"
                              ContentTemplate="{TemplateBinding ContentTemplate}"
                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              Margin="{TemplateBinding Padding}"/>
                        <Rectangle x:Name="FocusVisualElement" Stroke="#FF6DBDD1" StrokeThickness="1" Visibility="Collapsed" RadiusX="1" RadiusY="1" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--头部的 三分栏  工具按钮样式-->
    <Style x:Key="ToolBtnStyle" TargetType="Button">
        <Style.Setters>
            <Setter Property="Width" Value="90"></Setter>
            <Setter Property="Height" Value="20"></Setter>
            <Setter Property="Cursor" Value="Hand"></Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid x:Name="Container">
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="fillColor" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Normal" />
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Rectangle x:Name="fillColor" Opacity="0" Fill="#B5B5B5"  IsHitTestVisible="False" RadiusX="1" RadiusY="1"/>
                            <ContentPresenter                                
    			                x:Name="contentPresenter"
    			                Content="{TemplateBinding Content}"
    			                ContentTemplate="{TemplateBinding ContentTemplate}"
    			                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
    			                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
    			                Margin="{TemplateBinding Padding}"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style.Setters>
    </Style>
</ResourceDictionary>
